Traffic-Aware Secured Cooperative Framework for IoT-Based Smart Monitoring in Precision Agriculture

In recent decades, networked smart devices and cutting-edge technology have been exploited in many applications for the improvement of agriculture. The deployment of smart sensors and intelligent farming techniques supports real-time information gathering for the agriculture sector and decreases the burden on farmers. Many solutions have been presented to automate the agriculture system using IoT networks; however, the identification of redundant data traffic is one of the most significant research problems. Additionally, farmers do not obtain the information they need in time, such as data on water pressure and soil conditions. Thus, these solutions consequently reduce the production rates and increase costs for farmers. Moreover, controlling all agricultural operations in a controlled manner should also be considered in developing intelligent solutions. Therefore, this study proposes a framework for a system that combines fog computing with smart farming and effectively controls network traffic. Firstly, the proposed framework efficiently monitors redundant information and avoids the inefficient use of communication bandwidth. It also controls the number of re-transmissions in the case of malicious actions and efficiently utilizes the network’s resources. Second, a trustworthy chain is built between agricultural sensors by utilizing the fog nodes to address security issues and increase reliability by preventing malicious communication. Through extensive simulation-based experiments, the proposed framework revealed an improved performance for energy efficiency, security, and network connectivity in comparison to other related works.


Introduction
Today, the Internet and the Internet of Things (IoT) dominate nearly everyone's life. IoT is a paradigm that connects things, people, or networks and allows them to process and react precisely to any kind of physical or virtual communication [1][2][3]. IoT has applications in every industry, including healthcare, agriculture, and home controllers. It efficiently provides user-required services by utilizing Internet connectivity, sensors, and a variety of other technologies and protocols for collecting and analyzing data [4][5][6]. The Internet of Things helps companies to automate operations and improve service delivery using Internet technologies and cloud-based data transmission. For the various industries it is utilized in, IoT does not permit the adoption of universal software architecture; instead, it must be modified to meet user requirements [7][8][9]. Nowadays, smart agriculture is more important than ever because of the expanding global population and rising food demand. In this context, smart technologies have become a crucial route to cutting-edge agricultural practices [10][11][12]. There are many different applications, protocols, and prototypes in the field of agricultural land. i.
It provides a strategy to effectively manage IoT resources, identify the redundant nodes that are collecting the same data and forbid using them. Such a scheme is efficient in utilizing the resources of the network and prolonging the system life cycle. ii.
It develops intelligent methods using distributed machine learning to predict routing decisions for the selection of optimal forwarders with increasing data delivery and load balancing. iii.
Another aspect of the proposed framework is the usage of a fog system to establish a secure chain in the presence of unidentified and faulty nodes by establishing a reliable group of nodes. iv.
We verified the proposed framework with other work and the results demonstrate enhanced performance for various network parameters.
This paper is further organized as follows: the discussion for related studies is presented in Section 2. Section 3 presents the detail of the proposed framework. In Section 4, the simulation environment is briefly explained. Section 5 presents the results and discussion of the experiments. Lastly, the conclusion is in Section 6.

Related Work
The smart city emerged as a concept with the fast growth of dependable information and communication models and the combination of sensor technologies [24][25][26]. Modern fog computing technology develops intelligent networks combining IoT networks and cloud platforms. Fog computing is applied at the network edge, and they perform a significant number of tasks in terms of processing, storage, and communication. Networking devices such as routers, gateways, etc., make up fog computing. Compared to sensor nodes, these devices have more processing, transmission, and storage capabilities [27,28]. In an IoT system, fog nodes received data from sensors and are further forwarded for high-cost processing with the support of data centers. A smart city promotes sustainability by utilizing various sensors to collect information from the environment while providing improved social facilities, transportation, and accessibility. The gathered information can then be utilized to manage urban infrastructure, including water supply, food services, environmental monitoring, and traffic congestion [29][30][31]. Smart agriculture is based on the IoT with future generation networks and is expected to benefit from the intelligently developed methodologies. The objectives of this strategy are to preserve water resources, lessen soil erosion, and improve soil quality [32,33]. An effective and scalable protocol for the remote monitoring and decision making of farms in rural areas is named the CL-IoT protocol, and it was proposed to focus on the requirements for smart farming applications [34]. To decrease network communication delay, latency, and energy consumption, cross-layer-based clustering, and routing algorithms were developed. The cluster head (CH) selection method based on cross-layers has been proposed as a means of solving the energy efficiency issue for resource constraint networks. Each sensor's physical, medium

Limitations of the Existing Schemes
The summary of relevant studies shows that the IoT has grown significantly in creating and developing smart agriculture systems. It aids the farmers in monitoring soil conditions and water supply and increases productivity with the management of costs. It gathers the agricultural data and sends them to cloud databases to take the necessary actions accordingly. Numerous solutions have recently been proposed to deal with intelligent data monitoring with improved latency using machine learning techniques. However, many of the existing systems do not make it apparent how different connections are handled when there are redundant data. Moreover, efficient load balancing with the collaboration of mobile sensors is another significant research challenge [40,41]. Although many solutions have offered security for remote monitoring, this has been at the cost of computation and complexity. As a result, we need a framework to handle the timely supply of monitoring data using some smart and intelligent behaviors.

Material and Methods
This section presents a detailed discussion of the proposed framework with the system model. Additionally, its algorithm and developed components are explained.

System Model and Background of the Proposed Framework
The system model consists of sensors, fog nodes, and the sink node. They are deployed at random positions and the sink node is mobile. The fog nodes are considered more intelligent and have sufficient resources as compared to ordinary sensors. The mobile sink has a direct association with cloud systems. Initially, IoT sensors are arranged in an undirected graph G with finite vertices N and edges E. Each node has enough memory to hold and maintain its neighbors' information. Similarly, neighbors in the fog system's proximity are arranged in the form list based on a particular score. Fog systems not only aggregate the agricultural data for transmission towards the sink node but also offer a security layer among sensors and cloud services. Each node has a prefixed transmission range, and in case the sink node is far away from it, the proposed framework adopts a multi-hop forwarding decision. We show the scenario for the proposed framework in Figure 1. A robust routing strategy was built with the identification of the redundant nodes, and agricultural sensors are installed in the field to sense the various situations. In the case of redundant nodes, such information is not permitted for transmission. Later, fog layers are made up of numerous fog nodes to initiate communication with sink nodes. Agriculture users may simply obtain the data from their smart devices with the support of cloud platforms. Our proposed framework also ensures data privacy and security in an unpredictable environment. many solutions have offered security for remote monitoring, this has been at the cost of computation and complexity. As a result, we need a framework to handle the timely supply of monitoring data using some smart and intelligent behaviors.

Material and Methods
This section presents a detailed discussion of the proposed framework with the system model. Additionally, its algorithm and developed components are explained.

System Model and Background of the Proposed Framework
The system model consists of sensors, fog nodes, and the sink node. They are deployed at random positions and the sink node is mobile. The fog nodes are considered more intelligent and have sufficient resources as compared to ordinary sensors. The mobile sink has a direct association with cloud systems. Initially, IoT sensors are arranged in an undirected graph with finite vertices and edges . Each node has enough memory to hold and maintain its neighbors' information. Similarly, neighbors in the fog system's proximity are arranged in the form list based on a particular score. Fog systems not only aggregate the agricultural data for transmission towards the sink node but also offer a security layer among sensors and cloud services. Each node has a prefixed transmission range, and in case the sink node is far away from it, the proposed framework adopts a multi-hop forwarding decision. We show the scenario for the proposed framework in Figure 1. A robust routing strategy was built with the identification of the redundant nodes, and agricultural sensors are installed in the field to sense the various situations. In the case of redundant nodes, such information is not permitted for transmission. Later, fog layers are made up of numerous fog nodes to initiate communication with sink nodes. Agriculture users may simply obtain the data from their smart devices with the support of cloud platforms. Our proposed framework also ensures data privacy and security in an unpredictable environment  Figure 2 depicts the block diagram of the proposed framework. It is comprised of three sub-blocks, i.e., network structure, machine learning system, and fog-based secured communication. Firstly, sensors, actuators, gateways, and other communication devices initialized themselves for sensing and forwarding agricultural data. The sensors continuously record environmental information, which is then sent to sink nodes via local coordinators or gateways. Second, a machine learning-based technique was created to reduce the communication overheads of the sensor nodes. Finally, the proposed system adopts the distributed regression function to assess the various attributes of the system and achieves efficient node management [42]. Moreover, the machine learning approach not only balances the load over the multiple routes, but the proposed framework can also identify the redundant nodes. Duplicate data are therefore prohibited from entering in proximity to fog nodes. In the end, a fog-based secured scheme is developed with the  Figure 2 depicts the block diagram of the proposed framework. It is comprised of three sub-blocks, i.e., network structure, machine learning system, and fog-based secured communication. Firstly, sensors, actuators, gateways, and other communication devices initialized themselves for sensing and forwarding agricultural data. The sensors continuously record environmental information, which is then sent to sink nodes via local coordinators or gateways. Second, a machine learning-based technique was created to reduce the communication overheads of the sensor nodes. Finally, the proposed system adopts the distributed regression function to assess the various attributes of the system and achieves efficient node management [42]. Moreover, the machine learning approach not only balances the load over the multiple routes, but the proposed framework can also identify the redundant nodes. Duplicate data are therefore prohibited from entering in proximity to fog nodes. In the end, a fog-based secured scheme is developed with the intelligence of fog nodes and cryptographic techniques. Fog nodes perform dual functionalities for communication with both the IoT system and cloud platform. This validates the authenticity of incoming packets, and accordingly, appropriate actions are taken. In the case of authorized nodes, they are allowed to send the data towards the cloud system or the request packets are dropped by the fog nodes. The information is recorded in the table about false messages and non-authentic devices. intelligence of fog nodes and cryptographic techniques. Fog nodes perform dual functionalities for communication with both the IoT system and cloud platform. This validates the authenticity of incoming packets, and accordingly, appropriate actions are taken. In the case of authorized nodes, they are allowed to send the data towards the cloud system or the request packets are dropped by the fog nodes. The information is recorded in the table about false messages and non-authentic devices.

Machine Learning-Based Distributed Regressional Analysis
Based on the undirected graph, the proposed framework identifies the initial and temporary routes ( , , … … , ). The selected routes are based on the distance factor and each node maintains its neighbor table in a controlled manner. By exploring the neighbor table, each node formulates a route to the sink node for data transmission. To attain an efficient routing scheme with balances the load and bandwidth utilization, the proposed framework initiates the nodes management activity on the routes . Let us consider that has a data to transmit to the sink node. Then, the proposed framework first identified the overlapping nodes that lay in the same transmission range. If any such nodes exist, then set their flag's value in the routing table. The flag value indicates the forwarding status of the nodes. Let us suppose that is the distance threshold of the node , and is the predefined radius. To determine the overlapping nodes, the proposed framework exploits the search zone candidate nodes based on the and , as given below After determining the candidate nodes, the proposed framework updates the routing table of source node with the latest statistical values of neighbors. Table 1 describes the format of the routing table. It comprised node identity, transmission power, flag value, computing score, and distance. The node identity which is one byte long is unique. The

Machine Learning-Based Distributed Regressional Analysis
Based on the undirected graph, the proposed framework identifies the initial and temporary routes R(r 1 , r 2 , . . . . . . , r n ). The selected routes are based on the distance factor and each node maintains its neighbor table in a controlled manner. By exploring the neighbor table, each node formulates a route to the sink node for data transmission. To attain an efficient routing scheme with balances the load and bandwidth utilization, the proposed framework initiates the nodes management activity on the routes r i . Let us consider that N i has a data D i to transmit to the sink node. Then, the proposed framework first identified the overlapping nodes that lay in the same transmission range. If any such nodes exist, then set their flag's value in the routing table. The flag value indicates the forwarding status of the nodes. Let us suppose that D t is the distance threshold of the node NDs, and r is the predefined radius. To determine the overlapping nodes, the proposed framework exploits the search zone candidate nodes C N based on the D t and r, as given below After determining the candidate nodes, the proposed framework updates the routing table of source node i with the latest statistical values of neighbors. Table 1 describes the format of the routing table. It comprised node identity, transmission power, flag value, computing score, and distance. The node identity which is one byte long is unique. The next field is one byte long and contains the value of preset transmission power. The flag field is just a Boolean parameter to indicate whether the node can be silent or not, and it is one bit long. Finally, the scoring factor is two bytes long and depends on the captured information about the nodes. In the end, the distance is 1 byte long and contains information about the space toward the fog system. The proposed framework only allows one node in the transmission radius for sensing and forwarding the agricultural data. To achieve this, it determines the node score sc i with w i weighted coefficient using distributed weighted regression function X(i), and based on the maximum score, the flag value of the nodes i is set to either "True" or "False", as given below: The sc i value for node i is determined by exploring the residual energy e i , packets load PL i , distance D f i , as given below: where PL i defines in terms of transmitted packets N at time interval T, as defined below.

Fog Systems-Based Security Maintenance
In the proposed framework, the fog nodes performed the role of the intermediate system between the data originating network and cloud services. Firstly, it received all the data and stores it in memory for further analysis and processing. It then confirms the data authenticity to forward it towards the cloud system in the multi-hop discipline. Then, the aggregated data D A is encrypted En using the secret key k of the node i. Additionally, it is integrated with the identity ID i as given below.
Upon receiving, fog nodes decrypt it to retrieve the aggregated data and the identity of the data-originated node. After the decryption process, the fog nodes verify the identity of the nodes with their stored information, and if it matches positively, then it will look up its routing table for the selection of the next hop among the neighboring fogs. Moreover, the cloud system c authenticates the receiving data using digital signatures. To achieve this, the fog node FG first digitally signs the aggregated data D A using its private key p r to generate a secret value S, as given below. where On the other side, the cloud system first authenticates the digital signature using the public key of the fog nodes and upon successful verification, it is further forwarded to the connected end users with the IoT system. The flow between the developed techniques for intelligent agricultural routing is shown in Figure 3. Initial routes are formulated using the greedy method and exploited for optimizing the routing process. It can detect redundant nodes in the proximity of a predefined radius and accordingly, it sets the flag value by exploring the intelligent technique of machine learning. The flag value indicates the status of neighbors and whether they can transmit the data or keep them in silent mode. Finally, agricultural data is transmitted towards the sink node using the fog-based IoT system. connected end users with the IoT system. The flow between the developed techniques for intelligent agricultural routing is shown in Figure 3. Initial routes are formulated using the greedy method and exploited for optimizing the routing process. It can detect redundant nodes in the proximity of a predefined radius and accordingly, it sets the flag value by exploring the intelligent technique of machine learning. The flag value indicates the status of neighbors and whether they can transmit the data or keep them in silent mode. Finally, agricultural data is transmitted towards the sink node using the fog-based IoT system.  Figure 4 explains the security algorithm for transmitting agricultural data with the support of fog nodes. It clarifies the fog-based trust mechanism with privacy concerns and reliability. Accordingly, the proposed security algorithm decreases the probabilities of network attacks and stabilizes the communication system. Fog nodes are utilized as a bridge to facilitate both the IoT and cloud systems. Firstly, fog nodes verified the incoming agricultural data, and upon its validation, authentication and session agreement are established. The session agreement is valid for a particular time and needs to be refreshed later for further communication. In case verification is unsuccessful, then the error message is generated towards the data originating node. Additionally, fog nodes construct routing paths for data forwarding by exploring the routing table. The routing information is updated and evaluated each time that data transmission is needed. In the end, fog and cloud ensure data security using cryptography-based digital signature and encryption techniques. Such a technique provides high-level security measures to the upper layers.  Figure 4 explains the security algorithm for transmitting agricultural data with the support of fog nodes. It clarifies the fog-based trust mechanism with privacy concerns and reliability. Accordingly, the proposed security algorithm decreases the probabilities of network attacks and stabilizes the communication system. Fog nodes are utilized as a bridge to facilitate both the IoT and cloud systems. Firstly, fog nodes verified the incoming agricultural data, and upon its validation, authentication and session agreement are established. The session agreement is valid for a particular time and needs to be refreshed later for further communication. In case verification is unsuccessful, then the error message is generated towards the data originating node. Additionally, fog nodes construct routing paths for data forwarding by exploring the routing table. The routing information is updated and evaluated each time that data transmission is needed. In the end, fog and cloud ensure data security using cryptography-based digital signature and encryption techniques. Such a technique provides high-level security measures to the upper layers. Moreover, the functioning of the proposed framework consists of many states, as depicted in Figure 5. The system will be in a specific state at a given time, and it will change states when a particular trigger is called. The objectives of the states are defined below.  Moreover, the functioning of the proposed framework consists of many states, as depicted in Figure 5. The system will be in a specific state at a given time, and it will change states when a particular trigger is called. The objectives of the states are defined below.
-Sensor's deployment: In this state, agriculture nodes are randomly dispersed in the targeted area. They have limited constraints and not enough memory, transmissions, and processing resources. They are not able to communicate with the sink node directly; -Data sense: All the deployed sensors, actuators, and IoT devices collaborate in collecting the data. In addition, the data are transferred to the sink nodes through integrating fog systems. The fog nodes are explored for reducing communication delays; -Relay node: The data are obtained from the deployed sensors and forwarded towards the relay node. The roles for relay nodes are not predefined, they are chosen using quality-aware parameters; -Decision making: In this state, a distributed machine learning technique is applied using network statistics to offer the optimal results for attaining a reliable communication system; -Data security: In this end, security actions are performed in this state. It identifies faulty nodes and false messages to detect the comprised data using private values. It increases the reliability of remote users that are connected to cloud systems. Moreover, the functioning of the proposed framework consists of many states, as depicted in Figure 5. The system will be in a specific state at a given time, and it will change states when a particular trigger is called. The objectives of the states are defined below.
-Sensor's deployment: In this state, agriculture nodes are randomly dispersed in the targeted area. They have limited constraints and not enough memory, transmissions, and processing resources. They are not able to communicate with the sink node directly; -Data sense: All the deployed sensors, actuators, and IoT devices collaborate in collecting the data. In addition, the data are transferred to the sink nodes through integrating fog systems. The fog nodes are explored for reducing communication delays; -Relay node: The data are obtained from the deployed sensors and forwarded towards the relay node. The roles for relay nodes are not predefined, they are chosen using quality-aware parameters; -Decision making: In this state, a distributed machine learning technique is applied using network statistics to offer the optimal results for attaining a reliable communication system; -Data security: In this end, security actions are performed in this state. It identifies faulty nodes and false messages to detect the comprised data using private values. It increases the reliability of remote users that are connected to cloud systems.

Simulations
This section presents the simulation environment and a discussion of the various tests. We ran the simulations of a core i7 laptop with 64 GB RAM and 1 TB hard drive. 20 trials of the simulations were performed. Between 150 and 750 sensor nodes were used in

Simulations
This section presents the simulation environment and a discussion of the various tests. We ran the simulations of a core i7 laptop with 64 GB RAM and 1 TB hard drive. 20 trials of the simulations were performed. Between 150 and 750 sensor nodes were used in each simulation experiment. Zigbee technologies were used in the testing, and experiments were carried out in 1000 m × 1000 m area with a variety of configuration settings. For sensing the agricultural environment, numerous sensor categories were utilized, including temperature, air humidity, soil moisture, and water quality. Two sink nodes, between ten and fifteen 15 fog nodes, and various relay nodes were also deployed. Sensor nodes collected the agriculture data and forwarded them to the relay nodes for aggregation and data routing. The fog nodes existed between sensors and sink nodes. The duration of the experiments was 2000 rounds and each round had a time interval of 20 s. The sensors were equipped with GPS. Communication channels were scattered with certain malicious nodes to test the system's security. The results analysis was obtained based on the packet delivery, energy efficiency, network connectivity, and reliability metrics. All the network metrics were evaluated under scenarios of varying sensors and distances from the sink node. Table 2 contains the various parameters for simulations.

Results with Discussion
We evaluated the performance of the proposed framework with other studies in terms of energy efficiency. The performance evaluation of the proposed framework against those of related works is shown in Figure 6a,b for varied IoT sensors and the distance from the sink node. It was found that the proposed framework, even in the presence of malfunctioning nodes, considerably improves the delivery rate of data packets by an average of 20% for varying nodes, and 22% for varying distances from the sink. It results from exploring security approaches, key generation, and mutual trust. In the proposed paradigm, the intelligent system achieves sustainability and effectively identifies harmful activities by utilizing the secret and personal data of devices. Furthermore, the sink nodes are more powerful than IoT sensors and verify each activity before sending it to the end users. Unlike the majority of the proposed research, our framework explicitly provides intelligent decision modules for enhancing packet delivery performance with the aid of machine learning and sustains the network load with improved throughput. Figure 7a,b demonstrate the comparison of the proposed framework in the literature and it was discovered that it notably improves the network reliability by an average of 18% and 23% for both scenarios. This is due to the exposure of machine learning techniques to identify the optimal IoT nodes and intelligently interact with cloud systems. Moreover, the proposed framework can tackle redundant information and decreases the chances of data unavailability and congestion. Additionally, the security solution decreases unwanted traffic across the open transmission system and stops malicious devices from sending false route request packets. As a result, the proposed framework lengthens the response time for critical situations with a nominal delay rate. The comparison of the proposed and existing solutions is revealed in Figure 8a,b in terms of varying nodes and distances from the sink. The statistical analysis demonstrated that the proposed framework increased energy usage by 15% and 24%, respectively. Energy efficiency was found to be negatively impacted when the number of devices increased. On the other hand, the proposed framework provides a smart energy solution based on a distributed machine learning technique and smoothly selects the updated routes by utilizing the optimum solution. Additionally, the proposed framework effectively defends against multiple attacks and minimizes the consumption of network bandwidth by employing a security algorithm. Consequently, the nodes' energy is increased, which improves the performance of the entire network. By finding the redundant nodes in the routing table, the flag status is modified. Nodes whose flag value is false are therefore prohibited from participating in data routing. The performance comparison of the proposed framework to the existing solutions for network connectivity is illustrated in Figure 9a,b. Network connectivity indicates the active time at which nodes use particular communication links. The connectivity ratio for the proposed framework against various IoT devices and varied distances is remarkably enhanced by an average of 16% for varying distances from the sink and 20% in terms of varying nodes. This is due to the ability of the proposed framework to efficiently manage power distribution across the sensors and investigate the machine learning principles for accomplishing forwarding decisions.
Moreover, the proposed framework directs the routing module to formulate the routes by re-evaluating the decisions whenever any disrupted intermediate links are discovered or frequent re-transmissions. The proposed framework successfully manages the transmission overheads by including the least computational cost function.
which nodes use particular communication links. The connectivity ratio for the proposed framework against various IoT devices and varied distances is remarkably enhanced by an average of 16% for varying distances from the sink and 20% in terms of varying nodes. This is due to the ability of the proposed framework to efficiently manage power distribution across the sensors and investigate the machine learning principles for accomplishing forwarding decisions. Moreover, the proposed framework directs the routing module to formulate the routes by re-evaluating the decisions whenever any disrupted intermediate links are discovered or frequent re-transmissions. The proposed framework successfully manages the transmission overheads by including the least computational cost function.  nectivity is illustrated in Figure 9a,b. Network connectivity indicates the active time at which nodes use particular communication links. The connectivity ratio for the proposed framework against various IoT devices and varied distances is remarkably enhanced by an average of 16% for varying distances from the sink and 20% in terms of varying nodes. This is due to the ability of the proposed framework to efficiently manage power distribution across the sensors and investigate the machine learning principles for accomplishing forwarding decisions. Moreover, the proposed framework directs the routing module to formulate the routes by re-evaluating the decisions whenever any disrupted intermediate links are discovered or frequent re-transmissions. The proposed framework successfully manages the transmission overheads by including the least computational cost function.

Conclusions
With an emphasis on green energy and remote monitoring, smart technologies and agricultural systems have grown significantly in recent years. It controls the plants, soil characteristics, water pressure, and weather-related information, which benefits farmers and increases production. However, limited solutions have been proposed to enhance production in precision agriculture while reducing latency and information disturbance. Furthermore, protecting agricultural data while utilizing the insecure Internet is another significant research challenge. In this study, we presented a framework for providing a farmer communication system to enhance timely delivery through the cooperation of fog systems. This system also incorporates redundant information detection, which reduces network bandwidth inefficiencies. Additionally, the proposed framework employs security methods to counter privacy attacks on sensing data. The performance results showed the good outcomes of the proposed framework with maximum energy efficiency and delivery ratio. Furthermore, its performance has proven the improved processing usage in the existence of malicious devices. In the future, we intend to cope with the proposed framework's scalability and load-balancing issues with the support of a multi-cloud architecture. Moreover, we would like to integrate security to maintain cloud integrity from the point of users' perspective.

Conclusions
With an emphasis on green energy and remote monitoring, smart technologies and agricultural systems have grown significantly in recent years. It controls the plants, soil characteristics, water pressure, and weather-related information, which benefits farmers and increases production. However, limited solutions have been proposed to enhance production in precision agriculture while reducing latency and information disturbance. Furthermore, protecting agricultural data while utilizing the insecure Internet is another significant research challenge. In this study, we presented a framework for providing a farmer communication system to enhance timely delivery through the cooperation of fog systems. This system also incorporates redundant information detection, which reduces network bandwidth inefficiencies. Additionally, the proposed framework employs security methods to counter privacy attacks on sensing data. The performance results showed the good outcomes of the proposed framework with maximum energy efficiency and delivery ratio. Furthermore, its performance has proven the improved processing usage in the existence of malicious devices. In the future, we intend to cope with the proposed framework's scalability and load-balancing issues with the support of a multi-cloud architecture. Moreover, we would like to integrate security to maintain cloud integrity from the point of users' perspective.